<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Select</title>
</head>
<body>
  <div id="app"></div>
  <script type="text/javascript" src="../js/react.js"></script>
  <script type="text/javascript" src="../js/react-dom.js"></script>
  <script type="text/javascript" src="../babel/browser.js"></script>
  <script type="text/babel">
    ReactDOM.render(
      // 这里使用defaultValue来确定select标签的默认选中值
      // 如果不适用defaultValue，使用value，用户在改变选择时页面不会跟新，需要使用this.setState来重新更新value的值，才行
      <select defaultValue={"nan"}>
        <option value="nan">男</option>
        <option value="nv">女</option>
      </select>,
      document.getElementById("app")
    )
  </script>
</body>
</html>
